<include file="Public:header" />
	
    

	
<div class="autobox ">
	<div class="now">
		<i class="fa fa-home fa-lg move mr5"></i><a href="/" class="movesay">首页</a> &gt; <a href="/finan/index.html" class="movesay">财务中心 </a> &gt; 账户充值	</div>
	<div class="main-content">
		<style>
	.nav-tab-list .nav-tab-hover{
		width:100%;
		top:60px;
		height:50px;
		line-height:50px;
		background:#EAEDF4;
		position:absolute;
		box-sizing:content-box;
		z-index:1;
		transition:all 0.5s;
		-webkit-transition:all 0.5s;
		display:none;
	}
</style>
<script type="text/javascript">
	$(function () {
		(function () {
			var tab   = $('.nav-tab-list dd');
			var hover = $('.nav-tab-hover');
			var pos   = 0;
			tab.each(function (index) {
				var $this = $(this);
				if ($this.hasClass('active')) {
					pos = index;
				}
				$this.hover(function () {
					_moveTo(index);
				}, function () {
					_moveTo(pos);
				});
			});
			_moveTo(pos);
			$('.nav-tab-hover').show();
			function _moveTo(index) {
				hover.css("top", 60 + 50 * index);
				tab.removeClass('active');
				tab.eq(index).addClass('active');
			}
		})();
	});
	$(window).on('scroll resize', function () {
		if (document.body.scrollTop < 100) {
			$('#left-nav-bar').css("top", 0);
		} else if (document.body.scrollTop > ($('.tag-list-content').height() - $('#left-nav-bar').height() + 100)) {
			$('#left-nav-bar').css("top", ($('.tag-list-content').height() - $('#left-nav-bar').height()));
		} else {
			$('#left-nav-bar').css("top", document.body.scrollTop - 100);
		}
	});
</script>

<include file="Finance:left" />



        <div class="tag-list-content assets_content bg_w">
            <div class="safe_center clear">
                <h1>
					<span>
						账户充值					</span>
					<span>
												<a class="right" onclick="$('#hints').slideToggle();"><i class="fa fa-hand-o-right move fz_14 mr5"></i><span class="fz_12 move">查看介绍</span></a>
											</span>
                </h1>
            </div>
            <div id="hints" class="mytips" style="display:none;">

	            <p>                <notempty name="prompt_text">
                    {$prompt_text}
                </notempty></p>            </div>
            <div class="mytable-body ">
                <div class="step1   pwtrade  pw  mt50">
	                <div class="weituo_bizhong" style="margin-left: 149px;
    margin-bottom: 10px;">
		                <div class="bizhong_select">
			                <div class="bz_btn">
				              <img src="/upload/coin/cny.png" alt="" style=" width: 22px;float: left;
margin-top: 7px;
margin-right: 5px;"/>
				                								<span id="coin-default">
									<select name="type" id="coin-select" style="margin-top: 6px;">
																				<option value="cny"  selected="selected"  >人民币 (CNY)</option>
																			</select>
								</span>
			                </div>
		                </div>
		                <script>
			                $("#coin-select").change(function () {
				                var coin        = $("#coin-select option:selected").val();
				                window.location = '/finance/mycz.html';
			                });
		                </script>
		                <div class="bizhong_type" style="width: 220px;">
			                <span>可用<em class="coin-name"></em>：<font class="coin-balance">{$user_coin['cny']|NumToStr}</font></span>
		                </div>
	                </div>
	                <br>
                    <dl>
                        <dt>充值金额：</dt>
                        <dd style="position: relative;">
                            <input type="text" class="texts" id="cnyin_num" maxlength="12" value="">
                            <div style="position: absolute;right: 15px;top: 3px;">
                                <span id="random" class="random">.{:tradenob()}</span></div>
                        </dd>
                    </dl>
	                                    <dl>
                        <dt class="cnyin_type">充值方式：</dt>
                        <dd class="payment-icon-list payment-list ">
                            <ul style="width:600px;">
								<volist name="myczTypeList" id="vo">
									<li class="wx" data="{$key}"><img src="/comfile/images/{$key}.png" width="100"></li>
								</volist>
                                   
							</ul>
                            <input type="hidden" id="cnyin_type" value="">
                        </dd>
                    </dl>
	                                    <dl>
                        <dt></dt>
                        <dd>
                            <input type="button" class="btns2" value="立即充值" onclick="cnyin_up()">
                        </dd>
                    </dl>
                </div>
                <div class="step2 f_body">
                    <table class="f_table" id="investLog_content">
                        <thead>
                        <tr>
                            <th width="">充值时间</th>
                            <th width="">充值订单</th>
                            <th width="">充值方式</th>
                            <th width="">充值金额</th>
                            <th width="">实际到账</th>
                            <th width="">
								<span>
									<select id="status-select">

										<option value="" >全部状态</option>
										<option value="1"
										<eq name="status" value="1">selected</eq>
										>未付款</option>
										<option value="2"
										<eq name="status" value="2">selected</eq>
										>充值成功</option>
										<option value="3"
										<eq name="status" value="3">selected</eq>
										>人工到账</option>
										<option value="4"
										<eq name="status" value="4">selected</eq>
										>处理中</option>
												
												
										
										
                                    </select>

									
								</span>
                            </th>
                            <th width="">操作</th>
                        </tr>
                        </thead>
                        <tbody>
						
						
						
						<volist name="list" id="vo">
						
                           <tr>
                            <td>{$vo.addtime|date='Y-m-d H:i:s',###}</td>
	                        <td>{$vo.tradeno}</td>
                            <td>{$vo.type}</td>
                            <td>￥{$vo['num']|default="0.00"}</td>
                            <td>￥{$vo['mum']|default="0.00"}</td>
	                        <td>
			                   
							<eq name="vo.status" value="0">	
							   <div>未付款<a data-action="{$vo.typeEn}" data="{$vo['id']}"  onclick="cnyin_huikuan(this)" href="javascript:void(0)" style="    color: #2674FF!important;"> 我已汇款 </a></div>
			                </eq> 
							<eq name="vo.status" value="1">
								充值成功
							</eq>
							<eq name="vo.status" value="2">
								人工到账
							</eq>
							<eq name="vo.status" value="3">
								处理中
							</eq>
							 </td>
		                        <td>
			                        <div>
				                        <a onclick="cnyin_chakan({$vo['id']})" href="javascript:void(0)" class="cur" style="    color: #E55600!important;">查看</a>
			                        </div>
		                        </td>
	                         </tr>
						</volist>	 
							 
							 
							 
                                             
                        </tbody>
                    </table>
                    <div class="pages"> {$page}</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#status-select").val("{$status}");
    $("#status-select").change(function () {
        var status = $("#status-select option:selected").val();
        var url = '/Finance/mycz';
        if (status) {
            url += '/status/' + status+'.html';
        }
        window.location = url;
    });
    function cnyin_huikuan(_this) {
        var id = $(_this).attr('data');
        var type = $(_this).attr('data-action');
	    if(type == 'tenpay'){
		    layer.config({
			    extend: 'extend/layer.ext.js'
		    });
		    layer.ready(function () {
			    layer.prompt({
				    title: "输入充值成功订单后4位，并确认",
				    formType: 0
			    }, function (val) {
				    if (val) {
					    $.post("/finan/pay_huikuan.html", {id: id,type:type, remark: val}, function (data) {
						    if (data.status == 1) {
							    layer.msg(data.info, {icon: 1});
							    location.reload();
						    } else {
							    layer.msg(data.info, {icon: 2});
							    if (data.url) {
								    window.location = data.url;
							    }
						    }
					    }, "json");
				    }
				    ;
			    });
		    });
	    }else{
		    $.post("/Finance/myczHuikuan", {id: id,type:type}, function (data) {
			    if (data.status == 1) {
				    layer.msg(data.info, {icon: 1});
				    window.location.reload();
			    } else {
				    layer.msg(data.info, {icon: 2});
			    }
		    }, "json");
	    }
    }
    function cnyin_chakan(id) {
        layer.open({
            title: '账户充值',
            type: 2,
            area: ['650px', '500px'],
            content: ["{:U('Pay/mycz')}?id=" + id, 'no']
        });
    }
    $(".payment-list li").first().addClass("curr");
    $('#cnyin_type').val($(".payment-list li").first().attr('data'));
    $('.payment-list li').click (function () {
        $(this).addClass ('curr').siblings ('li').removeClass ('curr');
        $('#cnyin_type').val($(this).attr('data'));
    });
	var lock = 0;
    function cnyin_up() {
        var type = $('#cnyin_type').val();
        var num = $("#cnyin_num").val();
        if (type == "" || type == null) {
            layer.tips('请选择充值方式', '.cnyin_type', {tips: 2});
            return false;
        }
        if (num == "" || num == null) {
            layer.tips('请输入充值金额', '#cnyin_num', {tips: 2});
            return false;
        } else {
            num = num + $('#random').html();
        }
	    if(lock){
		    layer.msg('加载中,请勿重复点击...');
		    return;
	    }
	    lock = 1;
        $.post("/Finance/myczUp.html", {
            type: type,
            num: num
        }, function (data) {
	        lock = 0;
            if (data.status == 1) {
                layer.open({
                    title: "账户充值",
                    type: 2,
                    area: ['650px', '500px'],
                    content: ["/Pay/mycz.html?id=" + data.url.id, 'no'],
                    cancel: function () {
                        window.location = "/Finance/mycz.html";
                    }
                });
            } else {
                layer.msg(data.info, {icon: 2});
                if (data.url) {
                    window.location = data.url;
                }
            }
        }, "json");
    }
</script>

<script>
	var hints = "0";
	if(hints == 1){
		$('#hints').show();
	}
	$('#finance_box').addClass('active');
	$('.finan_pay').addClass('active');
</script>	
	

	
<include file="Public:footer" />